package org.ccay.excel.importer.service;

import java.util.Map;

import org.ccay.async.task.ImportTaskVO;
import org.ccay.core.exception.ApplicationException;
import org.ccay.core.io.VFSFileObject;
import org.ccay.excel.importer.IExcelImportContext;

/**
 * Excel 导入助理接口	
 * @author chaowangbang
 * @since 2012-2-9
 */
public interface IExcelImportAssistant {
	
	/** 
	 * 提交导入任务（创建到任务表并放入异步通道）
	 * @param fileInfo 导入的文件信息
	 * @param excelType Excel 类型
	 * @param context 上传文件的上下文
	 * @throws ApplicationException 
	 */
	ImportTaskVO submitImportTask(VFSFileObject fileInfo,String excelType,Map<String,String> context) throws ApplicationException;

	/** 
	 * 获取导入支持Bean
	 * @param excelType
	 * @return
	 */
	IExcelImportSupport getImportSupport(String excelType);
	
	/**
	 * 导入excel
	 * @param fileInfo
	 * @param excelType
	 * @param context
	 * @return
	 * @throws ApplicationException
	 * Created：2012-10-9
	 * @author chaowangbang
	 */
	IExcelImportContext importExcel(VFSFileObject fileInfo,String excelType,Map<String,String> context) throws ApplicationException;
	
	 

}
